﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Demos.util;
using mendian;
using Luna小店.DTO;
using Luna小店.UC.面料库存.面料出库.service;

namespace Luna小店.UC.面料库存
{
    public partial class Form订单领料出库 : DevExpress.XtraEditors.XtraForm
    {
        private String code { get; set; }
        public Form订单领料出库()
        {
            InitializeComponent();
            this.gridControl订单领料一览.DataSource = StockOutService.get订单领料出库申请List();   //调webService取值
        }
        public Form订单领料出库(String code)
        {
            InitializeComponent();
            this.code = code;
            this.gridControl订单领料一览.DataSource = StockOutService.get订单领料出库申请List();   //调webService取值
        }

        private void gridView订单领料一览_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            new Form面料出库单(
                this.code,
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "id"),
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "billNo"),
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "orderTypeId"),
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "orderCustomerTypeId"),
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "orderTypeName"),
                FunctionHelper.GetgridViewValue(this.gridView订单领料一览, this.gridView订单领料一览.FocusedRowHandle, "orderCustomerTypeName")
                ).ShowDialog();
            this.gridControl订单领料一览.DataSource = StockOutService.get订单领料出库申请List();  //调webService取值
            this.gridView订单领料一览.RefreshData();
        }
    }
    
}